package com.wyh.day05.exercises;

import java.util.Scanner;

/**
 * @author 王艺豪
 * @version 1.0
 */
public class Exercise01 {
    public static void main(String[] args) {

        //输出一个菜单
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println("========菜单========");
            System.out.println("1. 登录");
            System.out.println("2. 退出");
            System.out.println("你的输入是：");
            int key = scanner.nextInt();

            switch (key) {
                case 0:
                    System.out.println("强制退出程序");
                    return;
                case 1:
                    System.out.println("登录成功");
                    break;
                case 2:
                    System.out.println("系统出现故障,无法退出");
                    System.out.println("输出 0 强制退出");
                    break;
            }
        }
    }
}
